package com.airticketbooking.mapper;

import com.airticketbooking.po.Flight;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @author Mr.J
 * @version 1.0.0
 * @date 2024/10/21
 * @desc
 */
@Mapper
public interface FlightMapper {

	//	根据id查询航班信息
	@Select("SELECT * FROM airticketbooking.flight WHERE flight.flight_id = #{id}")
	public Flight getFlightById(Integer id);

	@Select("SELECT airplane_id FROM airticketbooking.flight_airplane WHERE flight_id = #{flightId} and status = 1")
	Integer getAirplaneIdById(Integer flightId);
}
